<?php

final class Admin extends Controller {
	
	public function main() {
		Session::init();
		$logged = Session::get('loggedIn');
		if($logged == false) {
			Session::destroy('loggedIn');
			header('location: '.URL.'login');
			exit;
		}
		$this->view->title = "SH3 - Painel de controle";
		$this->view->render('admin/index');
	}
	
	public function sair() {
		Session::init();
		Session::destroy('loggedIn');
		header('location: '.URL.'login');	
	}
	
}

?>